home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC Component Debug ƒ / 68k Component Debug ƒ / IC Call Glue.c < prev    next >
Encoding:
Text File  |  1995-11-18  |  26.2 KB  |  1,143 lines  |  [TEXT/SPM ]

  1. /*
  2.     IC Call Glue.c
  3.     
  4.     Code to call the IC component.
  5.     
  6.     The glue comes in two forms, PPC only and PPC/68k glue.
  7.     
  8.     The PPC/68k glue provides the ICStart and ICStop routines for starting
  9.     and stopping the IC Component.
  10.     
  11.     The PPC glue provides the PPC code for the component interface (see note below).
  12.     
  13.     Important Note:
  14.         
  15.         This information (probably ;-) was derived by examining the tech note
  16.         "QT 05 - Component Manager version 3.0" which describes in detail how
  17.         to call a component from PPC code.  Before modifying any of this code,
  18.         you should take a look at that tech note.
  19.     
  20.     The author of this code was not mentioned before I (dhn) modified it.  Whoever
  21.     it is deserves most of the credit.
  22. */
  23.  
  24. #include <Types.h>
  25. #include <MixedMode.h>
  26. #include <Components.h>
  27.  
  28. #include "IC Types.h"
  29. #include "IC Component API.h"
  30.  
  31. /*
  32.     ICCStart
  33.     
  34.     Routine to initialize the IC component.  Will ensure the component manager
  35.     is available, open a default instance of the IC component, and start it up.
  36. */
  37. pascal ICError ICCStart(internetConfigurationComponent *inst, OSType creator){
  38.     ICError err,junk;
  39.     long response;
  40.     
  41.     *inst=(internetConfigurationComponent)0;
  42.     
  43.     if (Gestalt(gestaltComponentMgr,&response)==noErr){
  44.         *inst=(internetConfigurationComponent)OpenDefaultComponent(internetConfigurationComponentType,internetConfigurationComponentSubType);
  45.     }
  46.     
  47.     if (*inst==(internetConfigurationComponent)0){
  48.         return badComponentInstance;
  49.     } else {
  50.         err=ICCStartComponent(*inst,creator);
  51.         
  52.         if (err!=noErr){
  53.             junk=CloseComponent((ComponentInstance)*inst);
  54.             *inst=(internetConfigurationComponent)0;
  55.         }
  56.     }
  57.     
  58.     return err;
  59. }
  60.  
  61. /*
  62.     ICCStop
  63.     
  64.     Shuts down the IC component then closes it completely.
  65. */
  66. pascal ICError ICCStop(internetConfigurationComponent inst){
  67.     ICError err,err2;
  68.     
  69.     err=ICCStopComponent(inst);
  70.     err2=CloseComponent((ComponentInstance)inst);
  71.     
  72.     if (err==noErr)
  73.         err=err2;
  74.     
  75.     return err;
  76. }
  77.  
  78. /*
  79.     Only include the following code if we are compiling for the PPC!
  80. */
  81. #if defined(powerc) || defined (__powerc)
  82.  
  83. enum {
  84.     uppCallComponentProcInf    };
  85.     
  86.     typedef struct ICCallGlue ICCallGlue;
  87. #pragma options align=reset
  88.     
  89.     ICCallGlue glue;
  90.     
  91.     SetupGlue(glue,kICCFindUserConfigFile,GlueParms,inst);
  92.     
  93.     SetGlueParm(glue,where,where);
  94.     
  95.     return CallComponentGlue(&glue);
  96. }
  97.  
  98. /*
  99.     
  100.     PPC glue to call the component with the correct selector.
  101. */
  102. pascal ICError ICCGeneralFindConfigFile(internetConfigurationComponent inst, Boolean search_prefs, Boolean can_create,
  103.         short count, ICDirSpecArrayPtr folders){
  104. #pragma options align=mac68k
  105.     struct GlueParms {
  106.         ICDirSpecArrayPtr folders;
  107.         short count;
  108.         Boolean can_create;
  109.         char filler1;
  110.         Boolean search_prefs;
  111.         char filler0;
  112.     };
  113.     
  114.     typedef struct GlueParms GlueParms;
  115.     
  116.     struct ICCallGlue {
  117.         PPC_Glue(GlueParms);
  118.     };
  119.     
  120.     typedef struct ICCallGlue ICCallGlue;
  121. #pragma options align=reset
  122.     
  123.     ICCallGlue glue;
  124.     
  125.     SetupGlue(glue,kICCGeneralFindConfigFile,GlueParms,inst);
  126.     
  127.     SetGlueParm(glue,search_prefs,search_prefs);
  128.     SetGlueParm(glue,filler1,0);
  129.     SetGlueParm(glue,filler0,0);
  130.     SetGlueParm(glue,can_create,can_create);
  131.     SetGlueParm(glue,count,count);
  132.     SetGlueParm(glue,folders,folders);
  133.     
  134.     return CallComponentGlue(&glue);
  135. }
  136.  
  137. /*
  138.     ICCChoseConfig
  139.     
  140.     PPC glue to call the component with the correct selector.
  141. */
  142. pascal ICError ICCChooseConfig(internetConfigurationComponent inst){
  143.     ICError err;
  144.     
  145. #pragma options align=mac68k
  146.     struct ICCallGlue {
  147.         PPC_VoidGlue;
  148.     };
  149.     
  150.     typedef struct ICCallGlue ICCallGlue;
  151. #pragma options align=reset
  152.     
  153.     ICCallGlue glue;
  154.     
  155.     SetupVoidGlue(glue,kICCChooseConfig,inst);
  156.     
  157.     err=CallComponentGlue(&glue);
  158.     
  159.     return err;
  160. }
  161.  
  162. /*
  163.     ICCChoseNewConfig
  164.     
  165.     PPC glue to call the component with the correct selector.
  166. */
  167. pascal ICError ICCChooseNewConfig(internetConfigurationComponent inst){
  168.     ICError err;
  169.     
  170. #pragma options align=mac68k
  171.     struct ICCallGlue {
  172.         PPC_VoidGlue;
  173.     };
  174.     
  175.     typedef struct ICCallGlue ICCallGlue;
  176. #pragma options align=reset
  177.     
  178.     ICCallGlue glue;
  179.     
  180.     SetupVoidGlue(glue,kICCChooseNewConfig,inst);
  181.     
  182.     err=CallComponentGlue(&glue);
  183.     
  184.     return err;
  185. }
  186.  
  187. /*
  188.     
  189.     PPC glue to call the component with the correct selector.
  190. */
  191. pascal ICError ICCGetConfigName(internetConfigurationComponent inst, Boolean longname,StringPtr name){
  192. #pragma options align=mac68k
  193.     struct GlueParms {
  194.         StringPtr name;
  195.         Boolean longname;
  196.         char filler;
  197.     };
  198.     
  199.     typedef struct GlueParms GlueParms;
  200.     
  201.     struct ICCallGlue {
  202.         PPC_Glue(GlueParms);
  203.     };
  204.     
  205.     typedef struct ICCallGlue ICCallGlue;
  206. #pragma options align=reset
  207.     
  208.     ICCallGlue glue;
  209.     
  210.     SetupGlue(glue,kICCGetConfigName,GlueParms,inst);
  211.     
  212.     SetGlueParm(glue,name,((StringPtr)name));
  213.     SetGlueParm(glue,longname,longname);
  214.     SetGlueParm(glue,filler,0);
  215.     
  216.     return CallComponentGlue(&glue);
  217. }
  218.  
  219. /*
  220.     
  221.     PPC glue to call the component with the correct selector.
  222. */
  223. pascal ICError ICCGetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref){
  224. #pragma options align=mac68k
  225.     struct GlueParms {
  226.         ICConfigRefHandle ref;
  227.     };
  228.     
  229.     typedef struct GlueParms GlueParms;
  230.     
  231.     struct ICCallGlue {
  232.         PPC_Glue(GlueParms);
  233.     };
  234.     
  235.     typedef struct ICCallGlue ICCallGlue;
  236. #pragma options align=reset
  237.     
  238.     ICCallGlue glue;
  239.     
  240.     SetupGlue(glue,kICCGetConfigReference,GlueParms,inst);
  241.     
  242.     SetGlueParm(glue,ref,ref);
  243.     
  244.     return CallComponentGlue(&glue);
  245. }
  246.  
  247. /*
  248.     
  249.     PPC glue to call the component with the correct selector.
  250. */
  251. pascal ICError ICCSetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref, long flags){
  252. #pragma options align=mac68k
  253.     struct GlueParms {
  254.         long flags;
  255.         ICConfigRefHandle ref;
  256.     };
  257.     
  258.     typedef struct GlueParms GlueParms;
  259.     
  260.     struct ICCallGlue {
  261.         PPC_Glue(GlueParms);
  262.     };
  263.     
  264.     typedef struct ICCallGlue ICCallGlue;
  265. #pragma options align=reset
  266.     
  267.     ICCallGlue glue;
  268.     
  269.     SetupGlue(glue,kICCSetConfigReference,GlueParms,inst);
  270.     
  271.     SetGlueParm(glue,flags,flags);
  272.     SetGlueParm(glue,ref,ref);
  273.     
  274.     return CallComponentGlue(&glue);
  275. }
  276.  
  277. /*
  278.     
  279.     PPC glue to call the component with the correct selector.
  280. */
  281. pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst, FSSpec *config){
  282. #pragma options align=mac68k
  283.     struct GlueParms {
  284.         FSSpec* config;
  285.     };
  286.     
  287.     typedef struct GlueParms GlueParms;
  288.     
  289.     struct ICCallGlue {
  290.         PPC_Glue(GlueParms);
  291.     };
  292.     
  293.     typedef struct ICCallGlue ICCallGlue;
  294. #pragma options align=reset
  295.     
  296.     ICCallGlue glue;
  297.     
  298.     SetupGlue(glue,kICCSpecifyConfigFile,GlueParms,inst);
  299.     
  300.     SetGlueParm(glue,config,config);
  301.     
  302.     return CallComponentGlue(&glue);
  303. }
  304.  
  305. /*
  306.     
  307.     PPC glue to call the component with the correct selector.
  308. */
  309. pascal ICError ICCGetSeed(internetConfigurationComponent inst, long *seed){
  310. #pragma options align=mac68k
  311.     struct GlueParms {
  312.         long* seed;
  313.     };
  314.     
  315.     typedef struct GlueParms GlueParms;
  316.     
  317.     struct ICCallGlue {
  318.         PPC_Glue(GlueParms);
  319.     };
  320.     
  321.     typedef struct ICCallGlue ICCallGlue;
  322. #pragma options align=reset
  323.     
  324.     ICCallGlue glue;
  325.     
  326.     SetupGlue(glue,kICCGetSeed,GlueParms,inst);
  327.     
  328.     SetGlueParm(glue,seed,seed);
  329.     
  330.     return CallComponentGlue(&glue);
  331. }
  332.  
  333. /*
  334.     
  335.     PPC glue to call the component with the correct selector.
  336. */
  337. pascal ICError ICCGetPerm(internetConfigurationComponent inst, ICPerm *perm){
  338. #pragma options align=mac68k
  339.     struct GlueParms {
  340.         ICPerm* perm;
  341.     };
  342.     
  343.     typedef struct GlueParms GlueParms;
  344.     
  345.     struct ICCallGlue {
  346.         PPC_Glue(GlueParms);
  347.     };
  348.     
  349.     typedef struct ICCallGlue ICCallGlue;
  350. #pragma options align=reset
  351.     
  352.     ICCallGlue glue;
  353.     
  354.     SetupGlue(glue,kICCGetPerm,GlueParms,inst);
  355.     
  356.     SetGlueParm(glue,perm,perm);
  357.     
  358.     return CallComponentGlue(&glue);
  359.     
  360. }
  361.  
  362. /*
  363.     
  364.     PPC glue to call the component with the correct selector.
  365. */
  366. pascal ICError ICCBegin(internetConfigurationComponent inst, ICPerm perm){
  367. #pragma options align=mac68k
  368.     struct GlueParms {
  369.         ICPerm perm;
  370.         char filler0;
  371.     };
  372.     
  373.     typedef struct GlueParms GlueParms;
  374.     
  375.     struct ICCallGlue {
  376.         PPC_Glue(GlueParms);
  377.     };
  378.     
  379.     typedef struct ICCallGlue ICCallGlue;
  380. #pragma options align=reset
  381.     
  382.     ICCallGlue glue;
  383.     
  384.     SetupGlue(glue,kICCBegin,GlueParms,inst);
  385.     
  386.     SetGlueParm(glue,perm,perm);
  387.     SetGlueParm(glue,filler0,0);
  388.     
  389.     return CallComponentGlue(&glue);
  390. }
  391.  
  392. /*
  393.     
  394.     PPC glue to call the component with the correct selector.
  395. */
  396. pascal ICError ICCGetPref(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Ptr buf, long *size){
  397. #pragma options align=mac68k
  398.     struct GlueParms {
  399.         long* size;
  400.         Ptr buf;
  401.         ICAttr* attr;
  402.         StringPtr key;
  403.     };
  404.     
  405.     typedef struct GlueParms GlueParms;
  406.     
  407.     struct ICCallGlue {
  408.         PPC_Glue(GlueParms);
  409.     };
  410.     
  411.     typedef struct ICCallGlue ICCallGlue;
  412. #pragma options align=reset
  413.     
  414.     ICCallGlue glue;
  415.     
  416.     SetupGlue(glue,kICCGetPref,GlueParms,inst);
  417.     
  418.     SetGlueParm(glue,size,size);
  419.     SetGlueParm(glue,buf,buf);
  420.     SetGlueParm(glue,attr,attr);
  421.     SetGlueParm(glue,key,key);
  422.     
  423.     return CallComponentGlue(&glue);
  424. }
  425.  
  426. /*
  427.     
  428.     PPC glue to call the component with the correct selector.
  429. */
  430. pascal ICError ICCSetPref(internetConfigurationComponent inst,StringPtr key, ICAttr attr, Ptr buf, long size){
  431. #pragma options align=mac68k
  432.     struct GlueParms {
  433.         long size;
  434.         Ptr buf;
  435.         ICAttr attr;
  436.         StringPtr key;
  437.     };
  438.     
  439.     typedef struct GlueParms GlueParms;
  440.     
  441.     struct ICCallGlue {
  442.         PPC_Glue(GlueParms);
  443.     };
  444.     
  445.     typedef struct ICCallGlue ICCallGlue;
  446. #pragma options align=reset
  447.     
  448.     ICCallGlue glue;
  449.     
  450.     SetupGlue(glue,kICCSetPref,GlueParms,inst);
  451.     
  452.     SetGlueParm(glue,size,size);
  453.     SetGlueParm(glue,buf,buf);
  454.     SetGlueParm(glue,attr,attr);
  455.     SetGlueParm(glue,key,key);
  456.     
  457.     return CallComponentGlue(&glue);
  458. }
  459.  
  460. /*
  461.     
  462.     PPC glue to call the component with the correct selector.
  463. */
  464. pascal ICError ICCFindPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Handle prefh){
  465. #pragma options align=mac68k
  466.     struct GlueParms {
  467.         Handle prefh;
  468.         ICAttr* attr;
  469.         StringPtr key;
  470.     };
  471.     
  472.     typedef struct GlueParms GlueParms;
  473.     
  474.     struct ICCallGlue {
  475.         PPC_Glue(GlueParms);
  476.     };
  477.     
  478.     typedef struct ICCallGlue ICCallGlue;
  479. #pragma options align=reset
  480.     
  481.     ICCallGlue glue;
  482.     
  483.     SetupGlue(glue,kICCFindPrefHandle,GlueParms,inst);
  484.     
  485.     SetGlueParm(glue,attr,attr);
  486.     SetGlueParm(glue,prefh,prefh);
  487.     SetGlueParm(glue,key,key);
  488.     
  489.     return CallComponentGlue(&glue);
  490. }
  491.  
  492. /*
  493.     
  494.     PPC glue to call the component with the correct selector.
  495. */
  496. pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Handle *prefh){
  497. #pragma options align=mac68k
  498.     struct GlueParms {
  499.         Handle* prefh;
  500.         ICAttr* attr;
  501.         StringPtr key;
  502.     };
  503.     
  504.     typedef struct GlueParms GlueParms;
  505.     
  506.     struct ICCallGlue {
  507.         PPC_Glue(GlueParms);
  508.     };
  509.     
  510.     typedef struct ICCallGlue ICCallGlue;
  511. #pragma options align=reset
  512.     
  513.     ICCallGlue glue;
  514.     
  515.     SetupGlue(glue,kICCGetPrefHandle,GlueParms,inst);
  516.     
  517.     SetGlueParm(glue,attr,attr);
  518.     SetGlueParm(glue,prefh,prefh);
  519.     SetGlueParm(glue,key,key);
  520.     
  521.     return CallComponentGlue(&glue);
  522. }
  523.  
  524. /*
  525.     
  526.     PPC glue to call the component with the correct selector.
  527. */
  528. pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr attr, Handle prefh){
  529. #pragma options align=mac68k
  530.     struct GlueParms {
  531.         Handle prefh;
  532.         ICAttr attr;
  533.         StringPtr key;
  534.     };
  535.     
  536.     typedef struct GlueParms GlueParms;
  537.     
  538.     struct ICCallGlue {
  539.         PPC_Glue(GlueParms);
  540.     };
  541.     
  542.     typedef struct ICCallGlue ICCallGlue;
  543. #pragma options align=reset
  544.     
  545.     ICCallGlue glue;
  546.     
  547.     SetupGlue(glue,kICCSetPrefHandle,GlueParms,inst);
  548.     
  549.     SetGlueParm(glue,attr,attr);
  550.     SetGlueParm(glue,prefh,prefh);
  551.     SetGlueParm(glue,key,key);
  552.     
  553.     return CallComponentGlue(&glue);
  554. }
  555.  
  556. /*
  557.     
  558.     PPC glue to call the component with the correct selector.
  559. */
  560. pascal ICError ICCCountPref(internetConfigurationComponent inst, long *count){
  561. #pragma options align=mac68k
  562.     struct GlueParms {
  563.         long* count;
  564.     };
  565.     
  566.     typedef struct GlueParms GlueParms;
  567.     
  568.     struct ICCallGlue {
  569.         PPC_Glue(GlueParms);
  570.     };
  571.     
  572.     typedef struct ICCallGlue ICCallGlue;
  573. #pragma options align=reset
  574.     
  575.     ICCallGlue glue;
  576.     
  577.     SetupGlue(glue,kICCCountPref,GlueParms,inst);
  578.     
  579.     SetGlueParm(glue,count,count);
  580.     
  581.     return CallComponentGlue(&glue);
  582. }
  583.  
  584. /*
  585.     
  586.     PPC glue to call the component with the correct selector.
  587. */
  588. pascal ICError ICCGetIndPref(internetConfigurationComponent inst, long n,StringPtr key){
  589. #pragma options align=mac68k
  590.     struct GlueParms {
  591.         StringPtr key;
  592.         long n;
  593.     };
  594.     
  595.     typedef struct GlueParms GlueParms;
  596.     
  597.     struct ICCallGlue {
  598.         PPC_Glue(GlueParms);
  599.     };
  600.     
  601.     typedef struct ICCallGlue ICCallGlue;
  602. #pragma options align=reset
  603.     
  604.     ICCallGlue glue;
  605.     
  606.     SetupGlue(glue,kICCGetIndPref,GlueParms,inst);
  607.     
  608.     SetGlueParm(glue,key,key);
  609.     SetGlueParm(glue,n,n);
  610.     
  611.     return CallComponentGlue(&glue);
  612. }
  613.  
  614. /*
  615.     
  616.     PPC glue to call the component with the correct selector.
  617. */
  618. pascal ICError ICCDeletePref(internetConfigurationComponent inst,StringPtr key){
  619. #pragma options align=mac68k
  620.     struct GlueParms {
  621.         StringPtr key;
  622.     };
  623.     
  624.     typedef struct GlueParms GlueParms;
  625.     
  626.     struct ICCallGlue {
  627.         PPC_Glue(GlueParms);
  628.     };
  629.     
  630.     typedef struct ICCallGlue ICCallGlue;
  631. #pragma options align=reset
  632.     
  633.     ICCallGlue glue;
  634.     
  635.     SetupGlue(glue,kICCDeletePref,GlueParms,inst);
  636.     
  637.     SetGlueParm(glue,key,key);
  638.     
  639.     return CallComponentGlue(&glue);
  640. }
  641.  
  642. /*
  643.     
  644.     PPC glue to call the component with the correct selector.
  645. */
  646. pascal ICError ICCEnd(internetConfigurationComponent inst){
  647. #pragma options align=mac68k
  648.     struct ICCallGlue {
  649.         PPC_VoidGlue;
  650.     };
  651.     
  652.     typedef struct ICCallGlue ICCallGlue;
  653. #pragma options align=reset
  654.     
  655.     ICCallGlue glue;
  656.     
  657.     SetupVoidGlue(glue,kICCEnd,inst);
  658.     
  659.     return CallComponentGlue(&glue);
  660. }
  661.  
  662. /*
  663.     
  664.     PPC glue to call the component with the correct selector.
  665. */
  666. pascal ICError ICCDefaultFileName(internetConfigurationComponent inst,StringPtr name){
  667. #pragma options align=mac68k
  668.     struct GlueParms {
  669.         StringPtr name;
  670.     };
  671.     
  672.     typedef struct GlueParms GlueParms;
  673.     
  674.     struct ICCallGlue {
  675.         PPC_Glue(GlueParms);
  676.     };
  677.     
  678.     typedef struct ICCallGlue ICCallGlue;
  679. #pragma options align=reset
  680.     
  681.     ICCallGlue glue;
  682.     
  683.     SetupGlue(glue,kICCDefaultFileName,GlueParms,inst);
  684.     
  685.     SetGlueParm(glue,name,name);
  686.     
  687.     return CallComponentGlue(&glue);
  688. }
  689.  
  690. /*
  691.     
  692.     PPC glue to call the component with the correct selector.
  693. */
  694. pascal ICError ICCGetComponentInstance(internetConfigurationComponent inst, Ptr *component_inst){
  695.     *component_inst = (Ptr)inst;
  696.     return (ICError)noErr;
  697. }
  698.  
  699. /*
  700.     
  701.     PPC glue to call the component with the correct selector.
  702. */
  703. pascal ICError ICCEditPreferences(internetConfigurationComponent inst,StringPtr key){
  704. #pragma options align=mac68k
  705.     struct GlueParms {
  706.         StringPtr key;
  707.     };
  708.     
  709.     typedef struct GlueParms GlueParms;
  710.     
  711.     struct ICCallGlue {
  712.         PPC_Glue(GlueParms);
  713.     };
  714.     
  715.     typedef struct ICCallGlue ICCallGlue;
  716. #pragma options align=reset
  717.     
  718.     ICCallGlue glue;
  719.     
  720.     SetupGlue(glue,kICCEditPreferences,GlueParms,inst);
  721.     
  722.     SetGlueParm(glue,key,key);
  723.     
  724.     return CallComponentGlue(&glue);
  725. }
  726.  
  727. /*
  728.     
  729.     PPC glue to call the component with the correct selector.
  730. */
  731. pascal ICError ICCParseURL(internetConfigurationComponent inst,StringPtr hint, Ptr data, long len,
  732.         long *selStart, long *selEnd, Handle url){
  733. #pragma options align=mac68k
  734.     struct GlueParms {
  735.         Handle url;
  736.         long* selEnd;
  737.         long* selStart;
  738.         long len;
  739.         Ptr data;
  740.         StringPtr hint;
  741.     };
  742.     
  743.     typedef struct GlueParms GlueParms;
  744.     
  745.     struct ICCallGlue {
  746.         PPC_Glue(GlueParms);
  747.     };
  748.     
  749.     typedef struct ICCallGlue ICCallGlue;
  750. #pragma options align=reset
  751.     
  752.     ICCallGlue glue;
  753.     
  754.     SetupGlue(glue,kICCParseURL,GlueParms,inst);
  755.     
  756.     SetGlueParm(glue,url,url);
  757.     SetGlueParm(glue,selEnd,selEnd);
  758.     SetGlueParm(glue,selStart,selStart);
  759.     SetGlueParm(glue,len,len);
  760.     SetGlueParm(glue,hint,hint);
  761.     SetGlueParm(glue,data,data);
  762.     
  763.     return CallComponentGlue(&glue);
  764. }
  765.  
  766. /*
  767.     
  768.     PPC glue to call the component with the correct selector.
  769. */
  770. pascal ICError ICCLaunchURL(internetConfigurationComponent inst,StringPtr hint, Ptr data, long len,
  771.     long *selStart, long *selEnd){
  772. #pragma options align=mac68k
  773.     struct GlueParms {
  774.         long* selEnd;
  775.         long* selStart;
  776.         long len;
  777.         Ptr data;
  778.         StringPtr hint;
  779.     };
  780.     
  781.     typedef struct GlueParms GlueParms;
  782.     
  783.     struct ICCallGlue {
  784.         PPC_Glue(GlueParms);
  785.     };
  786.     
  787.     typedef struct ICCallGlue ICCallGlue;
  788. #pragma options align=reset
  789.     
  790.     ICCallGlue glue;
  791.     
  792.     SetupGlue(glue,kICCLaunchURL,GlueParms,inst);
  793.     
  794.     SetGlueParm(glue,selEnd,selEnd);
  795.     SetGlueParm(glue,selStart,selStart);
  796.     SetGlueParm(glue,len,len);
  797.     SetGlueParm(glue,hint,hint);
  798.     SetGlueParm(glue,data,data);
  799.     
  800.     return CallComponentGlue(&glue);
  801. }
  802.  
  803. /*
  804.     
  805.     PPC glue to call the component with the correct selector.
  806. */
  807. pascal ICError ICCMapFilename(internetConfigurationComponent inst,StringPtr filename, ICMapEntry *entry){
  808. #pragma options align=mac68k
  809.     struct GlueParms {
  810.         ICMapEntry* entry;
  811.         StringPtr filename;
  812.     };
  813.     
  814.     typedef struct GlueParms GlueParms;
  815.     
  816.     struct ICCallGlue {
  817.         PPC_Glue(GlueParms);
  818.     };
  819.     
  820.     typedef struct ICCallGlue ICCallGlue;
  821. #pragma options align=reset
  822.     
  823.     ICCallGlue glue;
  824.     
  825.     SetupGlue(glue,kICCMapFilename,GlueParms,inst);
  826.     
  827.     SetGlueParm(glue,entry,entry);
  828.     SetGlueParm(glue,filename,filename);
  829.     
  830.     return CallComponentGlue(&glue);
  831. }
  832.  
  833. /*
  834.     
  835.     PPC glue to call the component with the correct selector.
  836. */
  837. pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst, OSType fType, OSType fCreator,StringPtr filename,
  838.     ICMapEntry *entry){
  839. #pragma options align=mac68k
  840.     struct GlueParms {
  841.         ICMapEntry* entry;
  842.         StringPtr filename;
  843.         OSType fCreator;
  844.         OSType fType;
  845.     };
  846.     
  847.     typedef struct GlueParms GlueParms;
  848.     
  849.     struct ICCallGlue {
  850.         PPC_Glue(GlueParms);
  851.     };
  852.     
  853.     typedef struct ICCallGlue ICCallGlue;
  854. #pragma options align=reset
  855.     
  856.     ICCallGlue glue;
  857.     
  858.     SetupGlue(glue,kICCMapTypeCreator,GlueParms,inst);
  859.     
  860.     SetGlueParm(glue,entry,entry);
  861.     SetGlueParm(glue,fCreator,fCreator);
  862.     SetGlueParm(glue,fType,fType);
  863.     SetGlueParm(glue,filename,filename);
  864.     
  865.     return CallComponentGlue(&glue);
  866. }
  867.  
  868. /*
  869.     
  870.     PPC glue to call the component with the correct selector.
  871. */
  872. pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst, Handle entries,StringPtr filename, ICMapEntry *entry){
  873. #pragma options align=mac68k
  874.     struct GlueParms {
  875.         ICMapEntry* entry;
  876.         StringPtr filename;
  877.         Handle entries;
  878.     };
  879.     
  880.     typedef struct GlueParms GlueParms;
  881.     
  882.     struct ICCallGlue {
  883.         PPC_Glue(GlueParms);
  884.     };
  885.     
  886.     typedef struct ICCallGlue ICCallGlue;
  887. #pragma options align=reset
  888.     
  889.     ICCallGlue glue;
  890.     
  891.     SetupGlue(glue,kICCMapEntriesFilename,GlueParms,inst);
  892.     
  893.     SetGlueParm(glue,entry,entry);
  894.     SetGlueParm(glue,entries,entries);
  895.     SetGlueParm(glue,filename,filename);
  896.     
  897.     return CallComponentGlue(&glue);
  898. }
  899.  
  900. /*
  901.     
  902.     PPC glue to call the component with the correct selector.
  903. */
  904. pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst, Handle entries, OSType fType, OSType fCreator,
  905.         StringPtr filename, ICMapEntry *entry){
  906. #pragma options align=mac68k
  907.     struct GlueParms {
  908.         ICMapEntry* entry;
  909.         StringPtr filename;
  910.         OSType fCreator;
  911.         OSType fType;
  912.         Handle entries;
  913.     };
  914.     
  915.     typedef struct GlueParms GlueParms;
  916.     
  917.     struct ICCallGlue {
  918.         PPC_Glue(GlueParms);
  919.     };
  920.     
  921.     typedef struct ICCallGlue ICCallGlue;
  922. #pragma options align=reset
  923.     
  924.     ICCallGlue glue;
  925.     
  926.     SetupGlue(glue,kICCMapEntriesTypeCreator,GlueParms,inst);
  927.     
  928.     SetGlueParm(glue,entry,entry);
  929.     SetGlueParm(glue,fCreator,fCreator);
  930.     SetGlueParm(glue,entries,entries);
  931.     SetGlueParm(glue,fType,fType);
  932.     SetGlueParm(glue,filename,filename);
  933.     
  934.     return CallComponentGlue(&glue);
  935. }
  936.  
  937. /*
  938.     
  939.     PPC glue to call the component with the correct selector.
  940. */
  941. pascal ICError ICCCountMapEntries(internetConfigurationComponent inst, Handle entries, long *count){
  942. #pragma options align=mac68k
  943.     struct GlueParms {
  944.         long* count;
  945.         Handle entries;
  946.     };
  947.     
  948.     typedef struct GlueParms GlueParms;
  949.     
  950.     struct ICCallGlue {
  951.         PPC_Glue(GlueParms);
  952.     };
  953.     
  954.     typedef struct ICCallGlue ICCallGlue;
  955. #pragma options align=reset
  956.     
  957.     ICCallGlue glue;
  958.     
  959.     SetupGlue(glue,kICCCountMapEntries,GlueParms,inst);
  960.     
  961.     SetGlueParm(glue,count,count);
  962.     SetGlueParm(glue,entries,entries);
  963.     
  964.     return CallComponentGlue(&glue);
  965. }
  966.  
  967. /*
  968.     
  969.     PPC glue to call the component with the correct selector.
  970. */
  971. pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst, Handle entries, long ndx, long *pos, ICMapEntry *entry){
  972. #pragma options align=mac68k
  973.     struct GlueParms {
  974.         ICMapEntry* entry;
  975.         long* pos;
  976.         long ndx;
  977.         Handle entries;
  978.     };
  979.     
  980.     typedef struct GlueParms GlueParms;
  981.     
  982.     struct ICCallGlue {
  983.         PPC_Glue(GlueParms);
  984.     };
  985.     
  986.     typedef struct ICCallGlue ICCallGlue;
  987. #pragma options align=reset
  988.     
  989.     ICCallGlue glue;
  990.     
  991.     SetupGlue(glue,kICCGetIndMapEntry,GlueParms,inst);
  992.     
  993.     SetGlueParm(glue,entry,entry);
  994.     SetGlueParm(glue,pos,pos);
  995.     SetGlueParm(glue,ndx,ndx);
  996.     SetGlueParm(glue,entries,entries);
  997.     
  998.     return CallComponentGlue(&glue);
  999. }
  1000.  
  1001. /*
  1002.     
  1003.     PPC glue to call the component with the correct selector.
  1004. */
  1005. pascal ICError ICCGetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry){
  1006. #pragma options align=mac68k
  1007.     struct GlueParms {
  1008.         ICMapEntry* entry;
  1009.         long pos;
  1010.         Handle entries;
  1011.     };
  1012.     
  1013.     typedef struct GlueParms GlueParms;
  1014.     
  1015.     struct ICCallGlue {
  1016.         PPC_Glue(GlueParms);
  1017.     };
  1018.     
  1019.     typedef struct ICCallGlue ICCallGlue;
  1020. #pragma options align=reset
  1021.     
  1022.     ICCallGlue glue;
  1023.     
  1024.     SetupGlue(glue,kICCGetMapEntry,GlueParms,inst);
  1025.     
  1026.     SetGlueParm(glue,entry,entry);
  1027.     SetGlueParm(glue,pos,pos);
  1028.     SetGlueParm(glue,entries,entries);
  1029.     
  1030.     return CallComponentGlue(&glue);
  1031.     
  1032. }
  1033.  
  1034. /*
  1035.     
  1036.     PPC glue to call the component with the correct selector.
  1037. */
  1038. pascal ICError ICCSetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry){
  1039. #pragma options align=mac68k
  1040.     struct GlueParms {
  1041.         ICMapEntry* entry;
  1042.         long pos;
  1043.         Handle entries;
  1044.     };
  1045.     
  1046.     typedef struct GlueParms GlueParms;
  1047.     
  1048.     struct ICCallGlue {
  1049.         PPC_Glue(GlueParms);
  1050.     };
  1051.     
  1052.     typedef struct ICCallGlue ICCallGlue;
  1053. #pragma options align=reset
  1054.     
  1055.     ICCallGlue glue;
  1056.     
  1057.     SetupGlue(glue,kICCSetMapEntry,GlueParms,inst);
  1058.     
  1059.     SetGlueParm(glue,entry,entry);
  1060.     SetGlueParm(glue,pos,pos);
  1061.     SetGlueParm(glue,entries,entries);
  1062.     
  1063.     return CallComponentGlue(&glue);
  1064. }
  1065.  
  1066. /*
  1067.     
  1068.     PPC glue to call the component with the correct selector.
  1069. */
  1070. pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst, Handle entries, long pos){
  1071. #pragma options align=mac68k
  1072.     struct GlueParms {
  1073.         long pos;
  1074.         Handle entries;
  1075.     };
  1076.     
  1077.     typedef struct GlueParms GlueParms;
  1078.     
  1079.     struct ICCallGlue {
  1080.         PPC_Glue(GlueParms);
  1081.     };
  1082.     
  1083.     typedef struct ICCallGlue ICCallGlue;
  1084. #pragma options align=reset
  1085.     
  1086.     ICCallGlue glue;
  1087.     
  1088.     SetupGlue(glue,kICCDeleteMapEntry,GlueParms,inst);
  1089.     
  1090.     SetGlueParm(glue,pos,pos);
  1091.     SetGlueParm(glue,entries,entries);
  1092.     
  1093.     return CallComponentGlue(&glue);
  1094. }
  1095.  
  1096. /*
  1097.     
  1098.     PPC glue to call the component with the correct selector.
  1099. */
  1100. pascal ICError ICCAddMapEntry(internetConfigurationComponent inst, Handle entries, ICMapEntry *entry){
  1101. #pragma options align=mac68k
  1102.     struct GlueParms {
  1103.         ICMapEntry* entry;
  1104.         Handle entries;
  1105.     };
  1106.     
  1107.     typedef struct GlueParms GlueParms;
  1108.     
  1109.     struct ICCallGlue {
  1110.         PPC_Glue(GlueParms);
  1111.     };
  1112.     
  1113.     typedef struct ICCallGlue ICCallGlue;
  1114. #pragma options align=reset
  1115.     
  1116.     ICCallGlue glue;
  1117.     
  1118.     SetupGlue(glue,kICCAddMapEntry,GlueParms,inst);
  1119.     
  1120.     SetGlueParm(glue,entry,entry);
  1121.     SetGlueParm(glue,entries,entries);
  1122.     
  1123.     return CallComponentGlue(&glue);
  1124. }
  1125.  
  1126. #endif /* USESROUTINEDESCRIPTORS */
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.